import os


def build_protobuf(file_name, mode="python"):
    file, ext = os.path.splitext(file_name)
    if mode == "python":
        file_ext = ".py"
        cmd = f"protoc --python_out=. {file_name}"
        target = f"{file}_pb2{file_ext}"
        Command(target, file_name, cmd)


build_protobuf("example.proto")
